<!--
 * @Author: H.
 * @Date: 2021-11-02 16:48:21
 * @LastEditTime: 2021-11-02 16:51:58
 * @Description: 
-->
<demo>
固定表头
</demo>
<template>
  <zeus-table
    :dataSource="dataSource"
    :columns="columns"
    :bordered="true"
    :height="250"
  ></zeus-table>
</template>

<script lang="ts">
import zeusTable from '../../lib/table/Table.vue'

export default {
  components: {
    zeusTable,
  },
  setup(props) {
    let dataSource = [
      {
        id: 1,
        date: '2021-07-07',
        name: '姚明',
        address: '上海市普陀区金沙江路 1518 弄',
      },
      {
        id: 2,
        date: '2021-07-06',
        name: '科比',
        address: '上海市普陀区金沙江路 1517 弄',
      },
      {
        id: 3,
        date: '2021-07-05',
        name: '勒布朗',
        address: '上海市普陀区金沙江路 1519 弄',
      },
      {
        id: 4,
        date: '2021-07-04',
        name: '詹姆斯',
        address: '上海市普陀区金沙江路 1511 弄',
      },
      {
        id: 5,
        date: '2021-07-04',
        name: '詹姆斯',
        address: '上海市普陀区金沙江路 1511 弄',
      },
      {
        id: 6,
        date: '2021-07-04',
        name: '詹姆斯',
        address: '上海市普陀区金沙江路 1511 弄',
      },
      {
        id: 7,
        date: '2021-07-04',
        name: '詹姆斯',
        address: '上海市普陀区金沙江路 1511 弄',
      },
      {
        id: 8,
        date: '2021-07-04',
        name: '詹姆斯',
        address: '上海市普陀区金沙江路 1511 弄',
      },
      {
        id: 9,
        date: '2021-07-04',
        name: '詹姆斯',
        address: '上海市普陀区金沙江路 1511 弄',
      },
    ]

    let columns = [
      { title: '日期', prop: 'date', width: '100' },
      { title: '姓名', prop: 'name', width: '100' },
      { title: '地址', prop: 'address' },
    ]

    return {
      dataSource,
      columns,
    }
  },
}
</script>

<style></style>
